<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var globalScope="全局作用域";

        function checkScope() {
            var a=1;
            var b=1;
            console.log("b:",b);
            function returnFun(){
                return a++;
            }
            return returnFun;
        }

        var test=checkScope();

        const a1=test();
        console.log("a1:",a1);

        const a2=test();
        console.log("a2:",a2);

        const a3=test();
        console.log("a3:",a3);

    </script>
</body>
</html>